/**
 * 
 */
package info.niwota.fwrite;

/**
 * @author qiangli
 * 
 */
public class Smiley {
	public static final String[] face_names = { "plain", "crying", "devilish",
			"grin", "kiss", "sad", "smile", "smile_big", "surprise", "wink" };

	public static final int[] face_ids = { R.string.face_plain,
			R.string.face_crying, R.string.face_devilish, R.string.face_grin,
			R.string.face_kiss, R.string.face_sad, R.string.face_smile,
			R.string.face_smile_big, R.string.face_surprise, R.string.face_wink };

	public static final int[] face_icons = { R.drawable.face_plain,
			R.drawable.face_crying, R.drawable.face_devilish,
			R.drawable.face_grin, R.drawable.face_kiss, R.drawable.face_sad,
			R.drawable.face_smile, R.drawable.face_smile_big,
			R.drawable.face_surprise, R.drawable.face_wink };
	
	public static String map(int icon) {
		for (int i = 0; i < face_icons.length; i++) {
			if (icon == face_icons[i]) {
				return face_names[i];
			}
		}
		return null;
	}
	
	public static int map(String name) {
		for (int i = 0; i < face_names.length; i++) {
			if (face_names[i].equals(name)) {
				return face_icons[i];
			}
		}
		return -1;
	}

	private Smiley() {
	}
}
